package org.xiaov.controller;

import org.xiaov.entity.Order;
import org.xiaov.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xiaov.common.bean.R;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * OrderAPI接口层
 * </p>
 *
 * @author xiaov
 * @date 2021-10-02 14:24:25
 */
@RestController
@RequestMapping("/order")
public class OrderController{

    @Resource
    private OrderService orderService;

    @GetMapping("/")
    public R list() {
        List<Order> list = orderService.list();
        return R.okMsgAndData("操作成功", list);
    }
}